package cn.rs.lvt.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 服务api文档配置
 *
 * @author 吕晓飞
 * @version 1.0
 * @since 2023/9/8 23:53
 */
@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI().info(new Info()//
                .title("test")//
                .version("1.0")//
                .contact(new Contact().name("iminifly").email("iminifly@outlook.com").url("https://www.cnblogs.com/iminifly/"))//
                .description("test")//
                .termsOfService("https://www.cnblogs.com/iminifly/p/17754812.html/")//
                .license(new License()//
                        .name("No License ( All Rights Reserved )")//
                        .url("https://choosealicense.com/no-permission/")));
    }

}
